
#include<unistd.h>
#include<sys/types.h>
#include <iostream>

using namespace std;



int main(int argc,char*const argv[],char* const env[])
{
    //printf("This is another process pid:%d ppid:%d\n",getpid(),getppid());
    //printf("This is another process pid:%d\n",getpid());
    //printf("PWD=%s\n",getenv("PWD"));
    printf("程序替换完成:pid:%d ppid:%d\n",getpid(),getppid());
    //printf("This is mytest pid:%d ppid:%d\n",getpid(),getppid());
    //printf("Myvalue=%s\n",getenv("Myvalue"));
    exit(0);
}





// int main(int argc, char *argv[], char *env[])
// {
//     cout << argv[0] << " begin running" << endl;
//     cout << "这是命令行参数: \n";
//     for(int i=0; argv[i]; i++)
//     {
//         cout << i << " : " << argv[i] << endl;
//     }
//     cout << "这是环境变量信息: \n";
//     for(int i = 0; env[i]; i++)
//     {
//         cout << i << " : " << env[i] << endl; 
//     }
//     cout << argv[0] << " stop running" << endl;
//     return 0;
// }